#pragma once
#include<functional>
#include"InetAddress.h"
#include "Timestamp.h"
namespace wjc {

	using  NewConnectionCallback = std::function<void(int sockfd, const net::InetAddress&)>;

	class Timestamp;
	class Buffer;
	class Connection;

	using BufferPtr = std::shared_ptr<Buffer>;
	using ConnectionPtr = std::shared_ptr<Connection>;
	using TimerCallback = std::function<void()>;
	using ConnectionCallback = std::function<void(const ConnectionPtr&)>;
	using CloseCallback = std::function<void(const ConnectionPtr&)>;
	using WriteCompleteCallback = std::function<void(const ConnectionPtr&)>;
	using HighWaterMarkCallback = std::function<void(const ConnectionPtr&,const int& len)>;
	using MessageCallback = std::function<void(const ConnectionPtr&, BufferPtr&, Timestamp)>;

	using OnTimerCallback = std::function<void()>;
	using OnEventCallback = std::function<void()>;

	using EventCallback = std::function<void()>;
	using ReadEventCallback = std::function<void(Timestamp)>;

	using RecvAliveCallback = std::function<void(char*, int)>;
	using SendAliveCallback = std::function<void(const ConnectionPtr&)>;
}
